package com.yoyo.itravel.bean;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Description 页面信息实体类--为了实现分类操作
 * 
 * @Author HZX
 * @Date 2020年4月10日 下午4:34:30
 */
public class PageBean<T> implements Serializable {
	
	private int totalCount; // 总记录数
	private int totalPage; // 总页数
	private int currentPage; // 当前页码
	private int pageSize; // 每一页显示的数据条数
	private int startPage; // 开始页码
	
	private List<T> list; // 每一页显示的具体的数据集合

	private Map<Object, T> map; // 以Map的形式存储数据

	public PageBean() {
		super();
	}

	public PageBean(int startPage, int pageSize) {
		this.pageSize = pageSize;
		this.startPage = startPage;
	}

	public PageBean(int totalCount, int totalPage, int currentPage,
					int pageSize, List<T> list) {
		super();
		this.totalCount = totalCount;
		this.totalPage = totalPage;
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.list = list;
	}

	public PageBean(int totalCount, int totalPage, int currentPage, int pageSize, int startPage, List<T> list, Map<Object, T> map) {
		this.totalCount = totalCount;
		this.totalPage = totalPage;
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.startPage = startPage;
		this.list = list;
		this.map = map;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public Map<Object, T> getMap() {
		return map;
	}

	public void setMap(Map<Object, T> map) {
		this.map = map;
	}

	public int getStartPage() {
		return startPage;
	}

	public void setStartPage(int startPage) {
		this.startPage = startPage;
	}

	@Override
	public String toString() {
		return "PageBean{" +
				"totalCount=" + totalCount +
				", totalPage=" + totalPage +
				", currentPage=" + currentPage +
				", pageSize=" + pageSize +
				", startPage=" + startPage +
				", list=" + list +
				", map=" + map +
				'}';
	}
}
